package com.fr.web.core.chwriter;

import com.fr.base.core.list.IntList;
import com.fr.report.web.ui.impl.form.TreeNodeToogleButton;
import com.fr.web.Repository;
import java.util.HashSet;

public abstract class TreeCellWriter extends CellHtmlWriter
{
  public HashSet tree_dn_rowIndex = null;
  public HashSet tree_dn_columnIndex = null;

  public TreeCellWriter(Repository paramRepository, int paramInt)
  {
    super(paramRepository, paramInt);
  }

  protected void dealWithTreeNodeSonList(TreeNodeToogleButton paramTreeNodeToogleButton)
  {
    int i;
    IntList localIntList = paramTreeNodeToogleButton.getRelativeIndexList();
    if ((localIntList != null) && (localIntList.size() > 1))
    {
      if (localIntList.get(0) == -1)
      {
        if (this.tree_dn_rowIndex == null)
          this.tree_dn_rowIndex = new HashSet();
        i = 1;
        while (true)
        {
          if (i >= localIntList.size())
            return;
          this.tree_dn_rowIndex.add(new Integer(localIntList.get(i)));
          ++i;
        }
      }
      if (this.tree_dn_columnIndex == null)
        this.tree_dn_columnIndex = new HashSet();
      for (i = 1; i < localIntList.size(); ++i)
        this.tree_dn_columnIndex.add(new Integer(localIntList.get(i)));
    }
  }
}